home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (C) 1991 Aladdin Enterprises. All rights reserved.
- Distributed by Free Software Foundation, Inc.
-
- This file is part of Ghostscript.
-
- Ghostscript is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
- to anyone for the consequences of using it or for whether it serves any
- particular purpose or works at all, unless he says so in writing. Refer
- to the Ghostscript General Public License for full details.
-
- Everyone is granted permission to copy, modify and redistribute
- Ghostscript, but only under the conditions described in the Ghostscript
- General Public License. A copy of this license is supposed to have been
- given to you along with Ghostscript so you can know your rights and
- responsibilities. It should be in a file named COPYING. Among other
- things, the copyright notice and this notice must be preserved on all
- copies. */
-
- /* gdevvdi.h */
-
- #include "gdevprn.h"
- #include "math_.h"
- #include <osbind.h>
- #include <stdlib.h>
- #include <gemdefs.h>
- #include <aesbind.h>
- #include <vdibind.h>
-
- /* Define the default device parameters. */
-
- #ifndef X_DPI
- #define X_DPI 80
- #endif
- #ifndef Y_DPI
- #define Y_DPI 80
- #endif
-
- #define WIDTH_10THS 85
- #define HEIGHT_10THS 110
-
- #define MIN(x, y) ((x <= y) ? x : y)
- #define MAX(x, y) ((x >= y) ? x : y)
-
- /* Macros for casting the pdev argument */
-
- #define ppdev ((gx_device_printer *)pdev)
- #define pmemdev ((gx_device_memory *)pdev)
-
- #define FULL_WIN 1 /* Redraw the full window. */
-
- #define DITH_GRAY(depth)\
- (depth == 16 ? 1535 : depth == 8 ? 39 : depth == 4 ? 7 : depth == 2 ? 2 : 1)
-
- #define DITH_RGB(depth)\
- (depth == 16 ? 40 : depth == 8 ? 6 : depth == 4 ? 2 : depth == 2 ? 2 : 1)
-
- typedef struct window {
- short handle; /* window handle */
- short gadgets; /* which window gadgets are enabled */
- short opened; /* flag for window state */
- char *title; /* pointer to window title */
- GRECT canvas; /* size of window work area */
- GRECT frame; /* sized of entire window */
- GRECT oframe; /* last frame size */
- GRECT mframe; /* maximum frame size */
- int (*redraw)(); /* routine for window redraw */
- } WINDOW;
-
- /* end gdevvdi.h */
-